package sv.gob.mh.dgii.model;

// Generated Dec 10, 2007 4:52:21 PM by Hibernate Tools 3.2.0.beta7

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * RcControlSerie generated by hbm2java
 */
@Entity
@Table(name = "RC_CONTROL_SERIE", schema = "RUC", uniqueConstraints = { @UniqueConstraint(columnNames = {
		"N_SERIE_INI", "N_SERIE_FIN", "M_TIPO_TARJETA" }) })
@SequenceGenerator(name="SEQ_RC_CONTROL_SERIE" , sequenceName="SEQ_RC_CONTROL_SERIE")		
public class RcControlSerie implements java.io.Serializable {

	// Fields    

	/**
	 * 
	 */
	private static final long serialVersionUID = 6539599824047162785L;

	private Long icontrolSerie;

	private TbAdmTrib tbAdmTrib;

	private RcTipoTarjeta rcTipoTarjeta;

	private Long nserieIni;

	private Long nserieFin;

	private Date fhingreso;

	private String cusuario;
	
	private String unidadReceptora;

	// Constructors


	/** default constructor */
	public RcControlSerie() {
	}



	// Property accessors
	@Id
	@Column(name = "I_CONTROL_SERIE", unique = true, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_RC_CONTROL_SERIE")
	public Long getIcontrolSerie() {
		return this.icontrolSerie;
	}

	public void setIcontrolSerie(Long icontrolSerie) {
		this.icontrolSerie = icontrolSerie;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
	@JoinColumn(name = "C_ADM_TRIB", unique = false, nullable = false, insertable = true, updatable = true)
	public TbAdmTrib getTbAdmTrib() {
		return this.tbAdmTrib;
	}

	public void setTbAdmTrib(TbAdmTrib tbAdmTrib) {
		this.tbAdmTrib = tbAdmTrib;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
	@JoinColumn(name = "M_TIPO_TARJETA", referencedColumnName="c_serie",  unique = false, nullable = false, insertable = true, updatable = true)	
	public RcTipoTarjeta getRcTipoTarjeta() {
		return this.rcTipoTarjeta;
	}

	public void setRcTipoTarjeta(RcTipoTarjeta rcTipoTarjeta) {
		this.rcTipoTarjeta = rcTipoTarjeta;
	}

	@Column(name = "N_SERIE_INI", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getNserieIni() {
		return this.nserieIni;
	}

	public void setNserieIni(Long nserieIni) {
		this.nserieIni = nserieIni;
	}

	@Column(name = "N_SERIE_FIN", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getNserieFin() {
		return this.nserieFin;
	}

	public void setNserieFin(Long nserieFin) {
		this.nserieFin = nserieFin;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", unique = false, nullable = false, insertable = true, updatable = true, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "C_USUARIO", unique = false, nullable = false, insertable = true, updatable = true, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}
	@Column(name = "C_UNIDAD", unique = false, nullable = true, insertable = true, updatable = true, length = 5)
	public String getUnidadReceptora() {
		return unidadReceptora;
	}



	public void setUnidadReceptora(String unidadReceptora) {
		this.unidadReceptora = unidadReceptora;
	}

}
